package com.iscas.tech.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.geekidea.springbootplus.framework.common.entity.BaseEntity;
import io.geekidea.springbootplus.framework.validator.groups.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 新闻附件表
 *
 * @author yangyi
 * @since 2020-10-26
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "AtNewsattach对象")
public class AtNewsattach extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @NotNull(message = "id不能为空", groups = {Update.class})
    @ApiModelProperty("主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @NotNull(message = "类型（1:新闻 2:政策 3:通知 4:观点 5:科普）不能为空")
    @ApiModelProperty("类型（1:新闻 2:政策 3:通知 4:观点 5:科普）")
    private Integer atType;

    @NotNull(message = "新闻id不能为空")
    @ApiModelProperty("新闻id")
    private Integer nId;

    @NotBlank(message = "附件名称不能为空")
    @ApiModelProperty("附件名称")
    private String nTitle;

    @NotBlank(message = "附件地址不能为空")
    @ApiModelProperty("附件地址")
    private String atUrl;

    @ApiModelProperty("删除状态（1存在，0刪除）")
    private Integer delstatus;

    @ApiModelProperty("创建人")
    private Integer createtitle;

    @ApiModelProperty("提交交易创建时间")
    private Date createtime;

}
